.class public final Lcom/burstly/lib/service/HostsProviderManager;
.super Ljava/lang/Object;
.source "HostsProviderManager.java"


# static fields
.field public static final TAG:Ljava/lang/String; = "IP list request"

.field private static sAdHostProvider:Lcom/burstly/lib/service/IHostProvider;

.field private static sApplicationContext:Landroid/content/Context;

.field private static sCurrencyHostProvider:Lcom/burstly/lib/service/IHostProvider;


# direct methods
.method private constructor <init>()V
    .locals 0

    .prologue
    .line 51
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 52
    return-void
.end method

.method public static declared-synchronized getAdProvider()Lcom/burstly/lib/service/IHostProvider;
    .locals 3

    .prologue
    .line 73
    const-class v1, Lcom/burstly/lib/service/HostsProviderManager;

    monitor-enter v1

    :try_start_0
    sget-object v0, Lcom/burstly/lib/service/HostsProviderManager;->sAdHostProvider:Lcom/burstly/lib/service/IHostProvider;

    if-nez v0, :cond_0

    .line 74
    new-instance v0, Lcom/burstly/lib/service/AdHostProvider;

    sget-object v2, Lcom/burstly/lib/service/HostsProviderManager;->sApplicationContext:Landroid/content/Context;

    invoke-direct {v0, v2}, Lcom/burstly/lib/service/AdHostProvider;-><init>(Landroid/content/Context;)V

    sput-object v0, Lcom/burstly/lib/service/HostsProviderManager;->sAdHostProvider:Lcom/burstly/lib/service/IHostProvider;

    .line 76
    :cond_0
    sget-object v0, Lcom/burstly/lib/service/HostsProviderManager;->sAdHostProvider:Lcom/burstly/lib/service/IHostProvider;
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    monitor-exit v1

    return-object v0

    .line 73
    :catchall_0
    move-exception v0

    monitor-exit v1

    throw v0
.end method

.method public static getCurrencyProvider()Lcom/burstly/lib/service/IHostProvider;
    .locals 2

    .prologue
    .line 87
    sget-object v0, Lcom/burstly/lib/service/HostsProviderManager;->sCurrencyHostProvider:Lcom/burstly/lib/service/IHostProvider;

    if-nez v0, :cond_0

    .line 88
    new-instance v0, Lcom/burstly/lib/service/CurrencyHostProvider;

    sget-object v1, Lcom/burstly/lib/service/HostsProviderManager;->sApplicationContext:Landroid/content/Context;

    invoke-direct {v0, v1}, Lcom/burstly/lib/service/CurrencyHostProvider;-><init>(Landroid/content/Context;)V

    sput-object v0, Lcom/burstly/lib/service/HostsProviderManager;->sCurrencyHostProvider:Lcom/burstly/lib/service/IHostProvider;

    .line 90
    :cond_0
    sget-object v0, Lcom/burstly/lib/service/HostsProviderManager;->sCurrencyHostProvider:Lcom/burstly/lib/service/IHostProvider;

    return-object v0
.end method

.method public static declared-synchronized init(Landroid/content/Context;)V
    .locals 2
    .parameter "currentContext"

    .prologue
    .line 62
    const-class v1, Lcom/burstly/lib/service/HostsProviderManager;

    monitor-enter v1

    :try_start_0
    sget-object v0, Lcom/burstly/lib/service/HostsProviderManager;->sApplicationContext:Landroid/content/Context;

    if-nez v0, :cond_0

    .line 63
    invoke-virtual {p0}, Landroid/content/Context;->getApplicationContext()Landroid/content/Context;

    move-result-object v0

    sput-object v0, Lcom/burstly/lib/service/HostsProviderManager;->sApplicationContext:Landroid/content/Context;
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    .line 65
    :cond_0
    monitor-exit v1

    return-void

    .line 62
    :catchall_0
    move-exception v0

    monitor-exit v1

    throw v0
.end method
